package com.sxj.corejava.code15_反射;

public class User extends Person {
    private Integer id;
    public String username;
    protected String password;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public User() {
    }

    public int add(int i, int j) {
        return i + j;
    }

    User(Integer id) {
        this.id = id;
    }

    private User(String username) {
        this.username = username;
    }

    protected User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public User(Integer id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
    }

    public void show01() {
        System.out.println("这是当前类中public修饰的方法");
    }

    void show02() {
        System.out.println("这是当前类中无修饰符的方法");
    }

    protected void show03() {
        System.out.println("这是当前类中protected修饰的方法");
    }

    private void show04() {
        System.out.println("这是当前类中private修饰的方法");
    }
}
